package com.mvc.framwork.controller;

import com.mvc.framwork.annotations.SelfAutowire;
import com.mvc.framwork.annotations.SelfController;
import com.mvc.framwork.annotations.SelfRequestMapping;
import com.mvc.framwork.pojo.XUser;
import com.mvc.framwork.service.UserService;

import java.util.List;

/**
 * @Author: xiaoqiang
 * @Description:
 * @Date: 2021/6/16
 * @Version: 1.0
 */
@SelfController
@SelfRequestMapping(value = "/user")
public class UserController {

    @SelfAutowire
    private UserService userService;

    @SelfRequestMapping("/list")
    public String getUser(String a) {
        List<XUser> user = userService.getUser(a);
        for (XUser xUser : user) {
            System.out.println(xUser.toString());
        }
        return user.toString();
    }
}
